<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>01-react的基本使用</title>
</head>
<body>
  <div id="app"></div>
  <!-- 1.引入js文件 -->
  <script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
  <script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
  <script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
  <script type="text/babel">
    class App extends React.Component {
      constructor(props) {
        super(props);
      
        this.state = {
          movies: ["星际穿越", "大话西游", "盗梦空间", "少年派"]
        }
      }
      render() {
        return (
          <div>
            <h2>电影列表</h2>
            <ul>
              {
                this.state.movies.map((item, index) => {
                  return (<li>{item}</li>)
                })
              }
            </ul>
          </div>
        )
      }
    }

    ReactDOM.render(<App/>, document.getElementById("app"));
  </script>
</body>
</html>